package org.ellwood.framework.common.core.base;

import com.baomidou.mybatisplus.annotation.*;
import com.fhs.core.trans.vo.TransPojo;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @BelongsProject: ellwood-pro
 * @BelongsPackage: org.ellwood.framework.common.core.base
 * @BelongsClass: EntityBase
 * @Description: // TODO
 * @Author: ellwood
 * @CreateTime: 2024/1/30 - 16:26
 * @Version: V1.0.0
 */
@Data
public class EntityBase implements TransPojo, Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId
    private Long id;

    @TableField(fill= FieldFill.INSERT,select = false)
    private Integer status;

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    // 创建者 // TODO 权限完成之后再进行配置自动填充
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    // 更新者 // TODO 权限完成之后再进行配置自动填充
    private Long updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

}
